package com.college.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="FACULITY_GROUP")
public class FacultyGroup implements Serializable {

	private static final long serialVersionUID = 5624381831551833717L;
	
	private Integer facultyGrpId;
	private Faculty faculty1;
	private Faculty faculty2;
	private Faculty faculty3;
	
	public FacultyGroup(){
		
	}

	public FacultyGroup(Integer facultyGrpId, Faculty faculty1,
			Faculty faculty2, Faculty faculty3, Faculty faculty4) {
		super();
		this.facultyGrpId = facultyGrpId;
		this.faculty1 = faculty1;
		this.faculty2 = faculty2;
		this.faculty3 = faculty3;
	}
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name="FACULITY_GROUP_ID")
	public Integer getFacultyGrpId() {
		return facultyGrpId;
	}

	public void setFacultyGrpId(Integer facultyGrpId) {
		this.facultyGrpId = facultyGrpId;
	}
	@ManyToOne(fetch=FetchType.EAGER)
	@JoinColumn(name="FACULITY_1", referencedColumnName="FACULITY_ID")
	public Faculty getFaculty1() {
		return faculty1;
	}

	public void setFaculty1(Faculty faculty1) {
		this.faculty1 = faculty1;
	}
	@ManyToOne(fetch=FetchType.EAGER)
	@JoinColumn(name="FACULITY_2", referencedColumnName="FACULITY_ID")
	public Faculty getFaculty2() {
		return faculty2;
	}

	public void setFaculty2(Faculty faculty2) {
		this.faculty2 = faculty2;
	}
	@ManyToOne(fetch=FetchType.EAGER)
	@JoinColumn(name="FACULITY_3", referencedColumnName="FACULITY_ID")
	public Faculty getFaculty3() {
		return faculty3;
	}

	public void setFaculty3(Faculty faculty3) {
		this.faculty3 = faculty3;
	}

	
}
